/**
 * 用户相关API
 */

const request = require('../utils/request');

/**
 * 获取用户信息
 * @returns {Promise} 返回Promise对象
 */
const getUserInfo = () => {
  return request.get('/user/info');
};

/**
 * 更新用户信息
 * @param {Object} userData - 用户数据
 * @returns {Promise} 返回Promise对象
 */
const updateUserInfo = (userData) => {
  return request.put('/user/update', userData);
};

/**
 * 提交实名认证
 * @param {Object} verifyData - 认证数据
 * @returns {Promise} 返回Promise对象
 */
const submitVerification = (verifyData) => {
  return request.post('/user/verify', verifyData);
};

/**
 * 获取认证状态
 * @returns {Promise} 返回Promise对象
 */
const getVerificationStatus = () => {
  return request.get('/user/verification/status');
};

module.exports = {
  getUserInfo,
  updateUserInfo,
  submitVerification,
  getVerificationStatus
};